package org.dxj.restaurantmanagementsystem.utils;

import java.io.File;
import java.io.IOException;

/**
 * @author Ding
 * @date 2019/11/23 19:53
 */
public class CreatePathName {

    //创建目录
    public boolean create(String Filename) throws IOException {
        File file = new File(Filename);
        if (file.exists()) {
            return false;
        }
        if (!Filename.endsWith(File.separator)) {
            Filename = Filename + File.separator;
        }
        if (file.mkdir()) {
            return true;
        } else {
            return false;
        }

    }
}
